<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <include file="Public:jquery" />
        <script type="text/javascript" src="__PUBLIC__/js/jQuery/plugin/jquery.filestyle.js"></script>
        <include file="Public:ajaxupload" />
        <include file="Public:startapp" />
        <include file="Public:startmoo" />
        <script type="text/javascript">
            $(function(){
                inputFileStyle();
            });
            
            function inputFileStyle () {
			  	$("input[type=file]").filestyle({
					image : "../Public/images/chk.png",
					imageheight : 25,
					imagewidth : 86,
					width : 260
				});
			}
            
        </script>
    </head>
    <body>
        <include file="Public:header" />
        
        <div class="layout">
            
            <include file="Public:position" />
            
            <table class="warp" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="sidebar" valign="top">
                        <include file="Public:sidebar" />
                    </td>
                    <td class="contents" valign="top">
                    	
                    	<ul class="act_this">
				    		<li<?php if(!isset($_GET['type']) || $_GET['type'] == 'index'){ ?> class="this"<?php } ?>><a href="{:U('index',array('tag'=>$_GET['tag']))}">首页轮换广告</a></li>
				    		<li<?php if($_GET['type'] == 'about'){ ?> class="this"<?php } ?>><a href="{:U('index',array('tag'=>$_GET['tag'],'type'=>'about'))}">关于我们(首页)</a></li>
				    		<li<?php if($_GET['type'] == 'allfree'){ ?> class="this"<?php } ?>><a href="{:U('index',array('tag'=>$_GET['tag'],'type'=>'allfree'))}">自由定制广告</a></li>
				    	</ul>
                                              
                        <div class="a_table">
                            <form action="__URL__/insert" method="post">
                            <?php
                            	switch ( $_GET['type'] ){
                            		case 'index' : 
                            			$type = 'index_banner';
                            			break;
                            		case 'allfree' : 
                            			$type = 'allfree';
                            	}
                            ?>
                            <input type="hidden" name="type" id="type" value="{$type}" />
                            <table cellspacing="1" width="100%" class="form_table">
                                <tr>
                                    <td align="right">标题</td>
                                    <td align="left"><input type="text" name="title" class="input_text w480" /></td>
                                </tr>
                                <tr>
                                    <td align="right">广告链接</td>
                                    <td align="left"><input type="text" name="url" class="input_text w480" /></td>
                                </tr>
                                <tr id="set_banner">
									<td align="right" class="left_text">图片</td>
									<td align="left">
										<span class="file_d_Upload">
											<input id="filedata" type="file" class="attText" name="filedata">
											<button class="attButton" id="buttonUpload" onclick="return ajaxFileUpload();">上传文件</button>
										</span>
									</td>
								</tr>
								<tr style="display:none;" id="loading">
									<td></td>
									<td align='left'><img src="../Public/images/loading.gif" /></td>
								</tr>
                                <tr>
                                    <td align="right">状态</td>
                                    <td align="left">
                                        <input type="radio" name="status" value="1" checked="checked" /> 显示 &nbsp;&nbsp;
                                        <input type="radio" name="status" value="0" /> 隐藏 &nbsp;&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">详细说明</td>
                                    <td align="left"><textarea name="dsp" id="dsp" style="width: 90%; height:160px;" class="input_text"></textarea></td>
                                </tr>
                                <tr>
                                    <td align="right"></td>
                                    <td align="left">
                                        <div class="submit_default_box">
                                            <input type="submit" class="submit_default" value="提交表单" />
                                            <span class="submit_default_icon" id="submit_icon"></span>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                            </form>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        
        <include file="Public:footer" />
    </body>
</html>